package com.he.buildermodel.product;

import java.util.ArrayList;
import java.util.List;

/**
 * product类
 */
public class Car {
    protected String name;
    protected double price;
    protected List<String> feature = new ArrayList<String>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public List<String> getFeature() {
        return feature;
    }

    public void addFeature(String feature) {
        this.feature.add(feature);
    }

    @Override
    public String toString() {
        return "Car{" +
                "name='" + name + '\'' +
                ", price=" + price +
                ", feature=" + feature +
                '}';
    }
}
